import { request } from '../config.js'


// 角色列表
export const getrolelist = (params) => {
  return request.get({
    url: '/role/index',
    params
  })
}


// 角色添加
export const getroleadd = (params) => {
  return request.postjson({
    url: '/role/add',
    data: JSON.stringify(params)
  })
}


// 角色编辑
export const getroleedit = (params) => {
  return request.postjson({
    url: '/role/update',
    data: JSON.stringify(params)
  })
}


// 角色删除
export const getroledel = (params) => {
  return request.get({
    url: '/role/delete/' + params.id,
  })
}

// 角色详情
export const getroleinfo = (params) => {
  return request.get({
    url: '/role/info/' + params.id
  })
}


// 角色状态修改
export const getroleechange = (params) => {
  return request.postjson({
    url: '/role/change',
    data: JSON.stringify(params)
  })
}


// 角色权限修改
export const getroleetreeselect = (params) => {
  return request.get({
    url: '/role/treeselect',
    params
  })
}